package com.zzjson.design.adapterdm.poweradapter;

/**
 * <p>****************************************************************************</p>
 * <p><b>Copyright © 2010-2019 shuncom team All Rights Reserved<b></p>
 * <ul style="margin:15px;">
 * <li>Description : cn.zzjson.design.adapterdm.poweradapter</li>
 * <li>Version     : 1.0.0</li>
 * <li>Creation    : 2019年03月31日</li>
 * <li>@author     : zzy0_0</li>
 * </ul>
 * <p>****************************************************************************</p>
 */
public class PowerAdapter implements DC5 {

    private AC220 ac220;

    public PowerAdapter(AC220 ac220){
        this.ac220=ac220;
    }

    @Override
    public int output5v() {
        int output=ac220.output();
        int dc5=output/44;
        System.out.println("由之前的电压"+output+"V"+"转换成"+dc5+"V");
        return dc5;
    }
}